<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>position</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        .main {
            position: relative;
        }

        .left {
            position: absolute;
            left: 0;
            width: 300px;
            background-color: red;
        }

        .center {
            position: absolute;
            left: 300px;
            right: 300px;
            background-color: blue;
        }

        .right {
            position: absolute;
            right: 0;
            width: 300px;
            background-color: #3A2CAC;
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="left">左</div>
        <div class="center">中
            <h2>绝对定位实现三栏布局：暴力定位，左靠边，右靠边，中间盒子放中间</h2>
        </div>
        <div class="right">右</div>
    </div>
</body>

</html>